Highcharts.setOptions({
    global: {
        useUTC: false
    }
});

var Chart = {};

Chart.create = function($container) {
    return $container.highcharts({
        chart: {
            type: 'spline',
            animation: Highcharts.svg
        },
        title: {
            text: ''
        },
        xAxis: {
            type: 'datetime'
        },
        yAxis: {
            min: 0
        },
        series: [],
        tooltip: {
            crosshairs: [true]
        },
        plotOptions: {
            series: {
                animation: false
            }
        }
    });
}

Chart.render = function($container, timeseries, yUnit) {
    return $container.highcharts({
        chart: {
            type: 'spline',
            animation: Highcharts.svg
        },
        title: {
            text: ''
        },
        xAxis: {
            type: 'datetime'
        },
        yAxis: {
            min: 0,
            title: {
                text: yUnit
            }
        },
        series: timeseries,
        tooltip: {
            crosshairs: [true]
        },
        plotOptions: {
            series: {
                animation: false
            }
        }
    });
}